package com.rr.classTest.classLoader;

/**
 * @author : RENBIAO
 * @createTime : 2022/2/10 10:05
 */
public class User {

    public static void main(String[] args) {

        User user = new User();
        Class<? extends User> aClass = user.getClass();

        ClassLoader classLoader = aClass.getClassLoader();  //AppClassLoader
        System.out.println(classLoader);

        ClassLoader parent = classLoader.getParent();  //ExtClassLoader   Java\jre1.8.0_231\lib\ext
        System.out.println(parent);

        ClassLoader parentToParent = parent.getParent();  //null  不存在；java程序获取不到
        System.out.println(parentToParent);
    }
}